home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Programming / fpc / compiler / import.pas < prev    next >
Pascal/Delphi Source File  |  1998-09-24  |  2KB  |  99 lines

  1. {
  2.     $Id: import.pas,v 1.1.1.1 1998/03/25 11:18:12 root Exp $
  3.     Copyright (c) 1998 by Peter Vreman
  4.  
  5.     This unit implements an uniform import object
  6.  
  7.     This program is free software; you can redistribute it and/or modify
  8.     it under the terms of the GNU General Public License as published by
  9.     the Free Software Foundation; either version 2 of the License, or
  10.     (at your option) any later version.
  11.  
  12.     This program is distributed in the hope that it will be useful,
  13.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.     GNU General Public License for more details.
  16.  
  17.     You should have received a copy of the GNU General Public License
  18.     along with this program; if not, write to the Free Software
  19.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21.  ****************************************************************************}
  22. unit import;
  23. interface
  24.  
  25. type
  26.   pimportlib=^timportlib;
  27.   timportlib=object
  28.     constructor Init;
  29.     destructor Done;
  30.     procedure preparelib(const s:string);virtual;
  31.     procedure importprocedure(const func,module:string;index:longint;const name:string);virtual;
  32.     procedure generatelib;virtual;
  33.   end;
  34. var
  35.   importlib : pimportlib;
  36.  
  37. procedure InitImport;
  38.  
  39. implementation
  40.  
  41. uses
  42.   systems,verbose,
  43.   os2_targ,win_targ;
  44.  
  45. constructor timportlib.Init;
  46. begin
  47. end;
  48.  
  49.  
  50. destructor timportlib.Done;
  51. begin
  52. end;
  53.  
  54.  
  55. procedure timportlib.preparelib(const s:string);
  56. begin
  57.   Message(exec_e_dll_not_supported);
  58. end;
  59.  
  60.  
  61. procedure timportlib.importprocedure(const func,module:string;index:longint;const name:string);
  62. begin
  63.   Message(exec_e_dll_not_supported);
  64. end;
  65.  
  66.  
  67. procedure timportlib.generatelib;
  68. begin
  69.   Message(exec_e_dll_not_supported);
  70. end;
  71.  
  72.  
  73. procedure InitImport;
  74. begin
  75.   case target_info.target of
  76.  target_Win32 : importlib:=new(pimportlibwin32,Init);
  77.    target_OS2 : importlib:=new(pimportlibos2,Init);
  78.   else
  79.    importlib:=new(pimportlib,Init);
  80.   end;
  81. end;
  82.  
  83. end.
  84. {
  85.   $Log: import.pas,v $
  86.   Revision 1.1.1.1  1998/03/25 11:18:12  root
  87.   * Restored version
  88.  
  89.   Revision 1.3  1998/03/10 01:17:19  peter
  90.     * all files have the same header
  91.     * messages are fully implemented, EXTDEBUG uses Comment()
  92.     + AG... files for the Assembler generation
  93.  
  94.   Revision 1.2  1998/03/06 00:52:21  peter
  95.     * replaced all old messages from errore.msg, only ExtDebug and some
  96.       Comment() calls are left
  97.     * fixed options.pas
  98.  
  99. }